package com.morningstar.system.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.morningstar.system.controller.query.SysUserQuery;
import com.morningstar.system.dao.entity.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * 用户表 数据层
 *
 * @author ruoyi
 */
public interface SysUserMapper extends BaseMapper<SysUser> {
    /**
     * 查询用户分页
     *
     * @param page         page对象
     * @param sysUserQuery 查询对象
     * @return 用户分页列表
     */
    IPage<SysUser> selectPage(IPage<?> page, SysUserQuery query);

    List<SysUser> selectAll();

    List<String> selectUserRoles(@Param("userId") Long userId);

    List<String> selectUserPosts(@Param("userId") Long userId);
}
